<template>
  <login v-if="!userInfo"></login>
  <layout v-else>
    <router-view></router-view>
  </layout>
</template>

<script>
  import layout from './layout/index.vue'
  import login from './login/login.vue'
  import {mapState} from 'vuex'
  export default {
    computed: {
      ...mapState({
        userInfo: state => state.commen.userInfo
      })
    },
    components: {
      login,
      layout
    }
  }
</script>

<style>
  /* CSS */

</style>
